/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package freya.bean;

/**
 *
 * @author Guilherme Baufaker
 */
import java.util.Calendar;
import java.util.Date;  
import java.util.GregorianCalendar;
import javax.faces.application.FacesMessage;
import javax.faces.context.FacesContext;
import javax.faces.event.ActionEvent;
import org.primefaces.component.calendar.CalendarUtils;
import org.primefaces.context.RequestContext;
  
public class CalendarBean {  
  
    private Date date1;
    private Date date2;
    private Date date3;
    private String data1;
    private String data2;

    public String getData1() {
        return data1;
    }

    public void setData1(String data1) {
        this.data1 = data1;
    }

    public String getData2() {
        return data2;
    }

    public void setData2(String data2) {
        this.data2 = data2;
    }

    public Date getDate1() {  
        return date1;  
    }  
  
    public void setDate1(Date date1) {  
        this.date1 = date1;  
    }
    
    public Date getDate2() {  
        return date2;  
    }  
  
    public void setDate2(Date date2) {  
        this.date2 = date2;  
    }
    
    /**
     * @return the date3
     */
    public Date getDate3() {
        return date3;
    }

    /**
     * @param date3 the date3 to set
     */
    public void setDate3(Date date3) {
        this.date3 = date3;
    }
    
    public String DataAtual()
    {      
        Calendar calendario = new GregorianCalendar();
        Date data = new Date();
        String string = null;
               
        calendario.setTime(data);
        string = String.valueOf(calendario.get(GregorianCalendar.DAY_OF_MONTH));
        string += "/";
        string += Integer.toString(calendario.get(GregorianCalendar.MONTH) + 1);
        string += "/";
        string += Integer.toString(calendario.get(GregorianCalendar.YEAR));
        
        return string;
    }

}  
